<?php 
      $post = $this->getPost();
      $imageWidth = Mage::getStoreConfig('blog/info/image_width');
      $imageHeight = Mage::getStoreConfig('blog/info/image_height');
      $helper = Mage::helper('cms');
      $processor = $helper->getBlockTemplateProcessor();
      $nextPost = $this->getNextPost();
      $prevPost = $this->getPrevPost();
      $postUrl = $post->getPostUrl();
	  $helperBlog = Mage::helper('blog');
?>

<?php if($post->getId()):?>
	<?php echo $this->getChildHtml('breadcrumbs') ?>
	<div class="em_post-action-top">
		<?php if($prevPost):?>
			<a class="prev-button" href="<?php echo $helperBlog->getBlogUrl($this->getLinkCat().$prevPost->getPostIdentifier().'.html')?>">
				<img src="<?php echo $this->getSkinUrl('em_blog/images/em_prev.gif',array('_secure'))?>"/>
			</a>
		<?php else:?>
			<a class="prev-button null" href="#">
				<img src="<?php echo $this->getSkinUrl('em_blog/images/em_prev-null.gif',array('_secure'))?>"/>
			</a>
		<?php endif;?>
		<?php if($nextPost):?>
			<a class="next-button" href="<?php echo $helperBlog->getBlogUrl($this->getLinkCat().$nextPost->getPostIdentifier().'.html')?>">
				<img src="<?php echo $this->getSkinUrl('em_blog/images/em_next.gif',array('_secure'))?>"/>
			</a>
		<?php else:?>
			<a class="next-button null" href="#">
				<img src="<?php echo $this->getSkinUrl('em_blog/images/em_next-null.gif',array('_secure'))?>"/>
			</a>
		<?php endif;?>
	</div>
	
	<div class="em_post-item">		
		<div class="post-title">
			<h2><?php echo $post->getPostContentHeading(); ?></h2>                   
		</div>
		<div class="post-content">
			<?php echo $processor->filter($post->getPostContent());?>
		</div>
		<div class="post-header">
			<p class="post-by">
				<span class="post-user"><span><?php echo $post->getAuthor()->getUsername(); ?></span></span>
			</p>
			<?php $date = new DateTime($post->getCreatedAt());?>
			<span class="post-time"><small class="time-stamp"><?php echo $date->format('M j Y'); ?></small></span>
		</div>
		<div class="em_post-action">
				<?php echo $this->getChildHtml('tag.post')?>
				<div class="post-share">
					<span><?php echo $this->__('Share this post') ?></span>
				<!-- Share This Post -->
					<a href="http://www.facebook.com/sharer.php?u=<?php echo $postUrl ?>&title=<?php echo urlencode($post['title']) ?>" target="_blank">
							<img border="0" src="http://3.bp.blogspot.com/_vLeiVavkV_M/SnleIlLdGwI/AAAAAAAABd8/RfHnWIGGMEY/s200/facebook.png" alt="Post item information on Facebook" title="Post item information on Facebook" />
					</a>

					<a href="http://twitter.com/home?status=Share <?php echo $postUrl ?>" title="Click to send this product to Twitter!" target="_blank">
							<img border="0" src="https://abs.twimg.com/a/1369273395/images/resources/twitter-bird-white-on-blue.png" alt="Add To Twiiter" title="Add To Twiiter">
					</a>

					<a title="Add To Del.icio.us" target="_blank" href="http://del.icio.us/post?url=<?php echo $postUrl ?>&amp;title=<?php echo urlencode($post['title']) ?>">
							<img border="0" src="http://2.bp.blogspot.com/_vLeiVavkV_M/Snld35mPSDI/AAAAAAAABds/ccrOpOmP9Zk/s200/delicious.png" alt="Add To Del.icio.us" title="Add To Del.icio.us">
					</a>

					<a title="Stumble This" target="_blank" href="http://www.stumbleupon.com/refer.php?url=<?php echo $postUrl ?>&amp;title=<?php echo urlencode($post['title']) ?>">
							<img border="0" src="http://2.bp.blogspot.com/_vLeiVavkV_M/SnleiulEMVI/AAAAAAAABeU/kO09nNTlQeo/s200/stumbleupon.png" alt="Stumble This" title="Stumble This">
					</a>

					<a title="Digg This" target="_blank" href="http://digg.com/submit?phase=2&amp;url=<?php echo $postUrl ?>&amp;title=<?php echo urlencode($post['title']) ?>">
							<img border="0" src="http://3.bp.blogspot.com/_vLeiVavkV_M/Snld_x-wXoI/AAAAAAAABd0/cTsGU_Y-zQ8/s200/digg.png" alt="Digg This" title="Digg This">
					</a>

					<a title="Add To Reddit" target="_blank" href="http://reddit.com/submit?url=<?php echo $postUrl ?>&amp;title=<?php echo urlencode($post['title']) ?>">
							<img border="0" src="http://3.bp.blogspot.com/_vLeiVavkV_M/SnleX1tMMtI/AAAAAAAABeM/gQSYdrmSc3k/s200/reddit.png" alt="Add To Reddit" title="Add To Reddit">
					</a>

					<a title="Add To Yahoo" target="_blank" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=<?php echo $postUrl ?>&amp;title=<?php echo urlencode($post['title']) ?>">
							<img border="0" src="http://1.bp.blogspot.com/_vLeiVavkV_M/SnlexsGX2QI/AAAAAAAABes/ai6zvzZKCgw/s200/yahoo.png" alt="Add To Yahoo" title="Add To Yahoo">
					</a>
				<!-- End Share This Post-->
				</div>
			</div>
		<div class="comments">
			<?php if($this->getAllowComment()):?>
					<?php echo $this->getChildHtml('comment.post')?>
			<?php endif;?>
		</div>
				
	</div>
<?php endif;?>
